<template>
    <div class="card rdsp-card-view maintainceReceivingPolice-page" data-page="maintainceReceivingPolice">
        <div class="card-content card-content-padding">
            <div class="maintaince-card-title">
                <!-- <span class="icon"></span> -->
                <span>接处警</span>
            </div>
            <div class="maintainceReceivingPolice-con">
                <div class="left">
                    <div @click="openPoliceList(10)">报警<span id="fireAlarmCount">0</span></div>
                    <div @click="openPoliceList(20)">故障<span id="faultAlarmCount">0</span></div>
                    <div @click="openPoliceList(30)">屏蔽<span id="shieldAlarmCount">0</span></div>
                    <div @click="openPoliceList(40)">联动<span id="linkageAlarmCount">0</span></div>
                </div>
                <div class="center"></div>
                <div class="right">
                    <div style="margin-top: 10px;" @click="openPolist(-1)">未处理<span>0</span></div>
                    <div @click="openPolist(1)">真实火警<span id="realAlarmResult">0</span></div>
                    <div @click="openPolist(1)">真实故障<span id="realFaultResult">0</span></div>
                    <div @click="openPolist(1)">误报<span id="wrongAlarmResult">0</span></div>
                    <div @click="openPolist(1)">测试<span id="testAlarmResult">0</span></div>
                    <div @click="openPolist(1)">其他<span id="otherResult">0</span></div>
                </div>
            </div>
        </div>
    </div>
</template>
<style scoped></style>
<script>
    return {
        data:function () {
            return{
            }
        },
        methods: {
            getPoliceNumber:function(){
                Dao.getAlarmTotalCount({
                    orgIds:single_Orgid_wbdw,
                    dataType:0,
                },function(data){
                    if(data){
                        $("#fireAlarmCount").html(common.transNullundefinedToZero(data.fireAlarmCount));
                        $("#faultAlarmCount").html(common.transNullundefinedToZero(data.faultAlarmCount));
                        $("#shieldAlarmCount").html(common.transNullundefinedToZero(data.shieldAlarmCount));
                        $("#linkageAlarmCount").html(common.transNullundefinedToZero(data.linkageAlarmCount));
                        
                        $("#realAlarmResult").html(common.transNullundefinedToZero(data.realAlarmResult));
                        $("#realFaultResult").html(common.transNullundefinedToZero(data.realFaultResult));
                        $("#wrongAlarmResult").html(common.transNullundefinedToZero(data.wrongAlarmResult));
                        $("#testAlarmResult").html(common.transNullundefinedToZero(data.testAlarmResult));
                        $("#otherResult").html(common.transNullundefinedToZero(data.otherResult));
                    }
                });
            },
            //警情类型
            openPoliceList(fireTType){
                app.router.navigate("/historyPoliceApply/0/"+fireTType+"/0/0/"+single_Orgid_wbdw+"/0/");
            },
            //处理状态
            openPolist(handlerStatus){
                app.router.navigate("/historyPoliceApply/0/-1/0/0/"+single_Orgid_wbdw+"/"+handlerStatus+"/");
            }
        },
        on: {
            pageAfterIn: function (e, page) {
                var self = this;
                self.getPoliceNumber();
            }
        }
    }
</script>